import { DefaultConfig, ApiControlConfig } from './DefaultConfig'
import BaseQuickRequest from './BaseQuickRequest'

/**
 * 创建请求实例
 * @param config 基础配置
 * @param apiControl 请求操作控制
 * @returns
 */
export function createRequest(config, apiControl) {
  const c = Object.assign({}, DefaultConfig, config)
  const a = Object.assign({}, ApiControlConfig, apiControl)
  return new BaseQuickRequest(c, a)
}
